Timers removal, rebased to master. Also fixed PMA memory distribution #410
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Changed version of #388/#399 pull requests, without timers and with reduced count on copy memory operations also, it includes PMA buffer distribution bug fix.
I tried to achieve the following goals: remove the dependency on the timer, and reduce the number of memcpy operations.
For example, the STM32F103C8T6 doesn't have so many timers, and using one of them for the CDC, is not so good.
And memcpy operations.
In fact, they occur too often. First, in the USBSerial::write method the data is copied from the caller buffer into the UserTxBuffer, then the CDC_TIM_PeriodElapsedCallback the same data is copied into the StackTxBuffer, this data is transferred to USBD_CDC_SetTxBuffer without copying, and from where they are copied to PMA. 3 copy operations, and I managed two.
Same situation with the receive.